The Maze Generation Problem is NP-complete

نویسنده

  • Mario Alviano
چکیده

The Maze Generation problem has been presented as a benchmark for the Second Answer Set Programming Competition. We prove that the problem is NP–complete and identify relevant classes of unsatisfiable instances. The Maze Generation (MG) problem has been presented as a benchmark for the Second Answer Set Programming (ASP) Competition1. The problem has been placed in the NP category, which contains problems in NP for which an algorithm in P is unknown. Here, we prove that the problem is in fact complete for the complexity class NP. In addition, we identify classes of unsatisfiable instances that are efficiently recognizable. We start the discussion by defining a maze. Definition 1 (Maze). A maze is an m × n grid, in which each cell is empty or a wall and two distinct cells on the edges are indicated as entrance and exit, satisfying the following conditions: (1) Each cell in an edge of the grid is a wall, except entrance and exit that are empty; (2) There is no 2 × 2 square of empty cells or walls; (3) If two walls are on a diagonal of a 2× 2 square, then not both of their common neighbors are empty; (4) No wall is completely surrounded by empty cells; (5) There is a path from the entrance to every empty cell. The MG problem is the decision problem concerning the possibility to build a maze by extending a partially fixed grid. Definition 2 (Maze Generation problem). An instance of the MG problem is a structure of the form 〈G, I,O,W,E〉, where G is a set of cells (pairs of integers) representing a grid, I and O are two distinct cells of G, W and E are subsets of G. The MG problem is then defined as follows: Given a structure 〈G, I,O,W,E〉, is there a maze of the same size of G such that I and O are entrance and exit, respectively, each cell in W is a wall and each cell in E is empty?

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Quantum Algorithm to Solve a Maze: Converting the Maze Problem into a Search Problem

We propose a different methodology towards approaching a Maze problem. We convert the problem into a Quantum Search Problem (QSP), and its solutions are sought for using the iterative Grover’s Search Algorithm. Though the category of mazes we are looking at are of the NP complete class[1], we have redirected such a NP complete problem into a QSP. Our solution deals with two dimensional perfect ...

متن کامل

How to make a picturesque maze

In the picturesque maze generation problem, we are given a rectangular black-and-white raster image and want to randomly generate a maze in which the solution path fills up the black pixels. While a simple formulation of the problem faces with NP-hardness, the proposed method generates such a maze in polynomial time by appropriately changing the formulation itself. Therefore, the algorithm itse...

متن کامل

Crosstalk-Constrained Maze Routing Based on Lagrangian Relaxation

With the increasing density of VLSI circuits, interconnection wires are getting packed even closer. This has increased the effect of interaction between wires on circuit performance and hence, the importance of controlling crosstalk. Maze routing is a robust and general approach which can be used in many situations including multi-layer interconnections. In this paper, we consider crosstalk avo...

متن کامل

Randomized Algorithm For 3-Set Splitting Problem and it's Markovian Model

In this paper we restrict every set splitting problem to the special case in which every set has just three elements. This restricted version is also NP-complete. Then, we introduce a general conversion from any set splitting problem to 3-set splitting. Then we introduce a randomize algorithm, and we use Markov chain model for run time complexity analysis of this algorithm. In the last section ...

متن کامل

The Simultaneous Maze Solving Problems

A grid maze is a binary matrix where fields containing a 0 are accessible while fields containing a 1 are blocked. In such a maze there are four possible movements: up, down, left, and right. We call a sequence of such movements a Solving Sequence if we visit the lower-right corner starting in the upper-left corner. Finding a Solving Sequence for a grid maze is a problem that has been thoroughl...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2009